<?php
require_once('lib/config.php');
require_once('lib/database.php');
require_once('lib/auth.php');
require_once('lib/user.php');
if($_POST['submit']){

	$check_auth = $auth->authenticate_user($_POST['username'] ,$_POST['password']);
	
	if($check_auth){		
		header("Location: home.php");
	}

}


?>
<form method="post" action="index.php" >
<fieldset>
<legend accesskey="l">Login</legend>

<label for="username">Username :</label>
<input type="text" name="username" />
<label for="password">Password :</label>
<input type="password" name="password" />
<input type="submit" value="login" name="submit" />
</fieldset>

</form>

